package ggaviator

import (
	"time"
	"wzgames/internal/model/aviatorp"
	"wzgames/internal/model/statement"
)

const (
	defaultTimeout = time.Second * 5
)

// 小飞机投注位序号
const (
	BetIdx1 = "1"
	BetIdx2 = "2"
)

// AcState 轮次信息和状态
type AcState struct {
	RoundId       int64
	State         int32
	End           int64
	StateStart    int64
	MaxMultiplier float64
	TimeLeft      int64
	Dateline      int64
	ExpectTime    int64
}

type CurrMultiplier struct {
	RoundId    int64
	Multi      float64
	MaxMulti   float64
	TimeElapse int64
	Crash      bool
}

// RoundCounterSettle 轮次结束后结算
type RoundCounterSettle struct {
	RoundId       int64
	MaxMultiplier float64
}

// RoundCounterRemove 轮次结束后移除缓存
type RoundCounterRemove struct {
	RoundId int64
}

// AutoBets Auto CashOut 缓存，便于结算
type AutoBets struct {
	Num  int
	Bets map[string]*AutoBetInfo // 小飞机投注位序号 : 缓存信息
}

// AutoBetInfo Auto CashOut 缓存信息，便于结算
type AutoBetInfo struct {
	CheckPoint bool // 是否已经 auto CashOut判断过了
	RoundId    int64
	AutoMulti  float64 // 设置的CashOut值
	BetIdx     string  // 小飞机投注位序号
	AvtMarker  *AviatorMarker
	// 投注信息
	BetN   *aviatorp.BetNote
	BetObj *statement.PlayBet
	AvBet  *statement.AviatorBetInfo
}
